set(CMAKE_INSTALL_PREFIX "/usr")
set(INSDIR "/usr/share/QtScrcpy/files")

spark_include(SparkDesktopMacros.cmake)
spark_desktop_macros(
    # 应用名称: Name[zh_CN]=
    "QtScrcpy"
    # 应用名称: Name=
    "QtScrcpy"
    # 应用说明: Comment=
    ""
    # 应用类型: Type=
    "Application"
    # 执行程序: Exec=
    "${INSDIR}/QtScrcpy"
    # 图标路径: Icon=
    "${INSDIR}/QtScrcpy.ico"
    # 应用分类: Categories=
    "Utility"
    # MIME类型: MimeType=
)
install(FILES  ${SPARK_DESKTOP_FILE} DESTINATION "/usr/share/applications")

get_target_property(V QtScrcpy RUNTIME_OUTPUT_DIRECTORY)

install(TARGETS QtScrcpy       DESTINATION ${INSDIR})
install(DIRECTORY ${V} 
    DESTINATION ${INSDIR} 
    USE_SOURCE_PERMISSIONS)
install(FILES  
    # ${V}/sndcpy.apk 
    # ${V}/adb
    QtScrcpy/res/QtScrcpy.ico 
    DESTINATION ${INSDIR} )

set(PROJECT_NAME "QtScrcpy")

# 注释行(使用方式)
spark_include(SparkDebPackageConfig.cmake)
add_package_descript(cmake/spark-deb-package.descript)